<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%-- <%@ include file="/common/links.jsp"%> --%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript"
	src="${ctx}/scripts/jquery-resize/jquery.ba-resize.js"></script>
<script type="text/javascript">
	var gridIdString = "#customerInfolist";
	jQuery(document).ready(
			function() {
				grid = jQuery(gridIdString);
				grid.jqGrid({
					url : "customerInfoGrid",
					datatype : "json",
					mtype : "GET",
					colModel : [ {
						name : 'customerInfoId',
						index : 'customerInfoId',
						align : 'center',
						label : '<s:text name="customerInfo.customerInfoId" />',
						hidden : false,
						key : true
					}, {
						name : 'customerName',
						index : 'customerName',
						align : 'center',
						label : '<s:text name="customerInfo.customerName" />',

					}, {
						name : 'note',
						index : 'note',
						align : 'center',
						label : '<s:text name="customerInfo.note" />'

					} ],

					jsonReader : {
						root : "pageList", // (2)
						page : "page",
						total : "total",
						records : "records", // (3)
						repeatitems : false
					},

					prmNames : {
						page : "page",
						rows : "pagesize",
						sort : "sortname",
						order : "sortorder"
					},
					rowNum : 10,
					rowList : [ 5, 10, 20, 50, 100, 200 ],
					pager : '#customerInfopager',
					rownumbers : true,
					sortname : 'customerInfoId',
					sortorder : 'desc',
					caption : '<s:text name="customerInfoList.title" />',
					height : "900",
					autowidth : false,
					loadui : "disable",
					multiselect : true,
					multiboxonly : true,
					hidegrid : false,
					gridComplete : function() {
						if (jQuery(this).getDataIDs().length > 0) {
							jQuery(this).jqGrid('setSelection',
									jQuery(this).getDataIDs()[0]);//默认选中第一行
						}
					},
					loadComplete : function(data) {
						resizeJqGrid($(this));
						if (data.ajaxStatus === "error")
							alertMsg.error(data.ajaxMessage);

					},
					loadError : function(xhr, st, err) {
						alertMsg.error("Type: " + st + "; Response: "
								+ xhr.status + " " + xhr.statusText);
					}

				});

				jQuery(grid).jqGrid('navGrid', '#customerInfopager', {
					edit : false,
					add : false,
					del : false,
					search : false,
					excel : false
				}, {}, {}, {}, {
					multipleSearch : false,
					multipleGroup : false
				});
			});

	/* function addCustomerInfo(){

		var url = "addCustomerInfo";
		var winTitle='<s:text name="customerInfoNew.title" />';
		url = encodeURI(url);
		$.pdialog.open(url, 'addCustomerInfo', winTitle, {mask:false,width:880,height:600});　
	}
	function editCustomerInfo(){
		var sid = jQuery("#customerInfolist").jqGrid('getGridParam','selrow');
		var url = "editCustomerInfo?id="+sid;
		var winTitle='<s:text name="customerInfoEdit.title" />';
		url = encodeURI(url);
		$.pdialog.open(url, 'editCustomerInfo', winTitle, {mask:false,width:880,height:600});　
	}
 */

</script>
</head>
<body>
	<div class="pageContent">
		<div class="panelBar">
			<ul class="toolBar">
			<!-- 	<li><a class="add" href="#"
					onclick="javaScript:addCustomerInfo();"><span>添加</span></a></li>
				<li class="line">line</li>
				<li><a class="delete" href="#"
					onclick="javaScript:processSelectedRecords('deleteCustomerInfo','确认删除吗?');"><span>删除</span></a></li>
				<li class="line">line</li>
				<li><a class="edit" href="#"
					onclick="javaScript:editCustomerInfo();"><span>修改</span></a></li>
				<li class="line">line</li>
				<li><a class="icon" href="#"
					onclick="javaScript:processSelectedRecords('disableCustomerInfo','确认停用吗?');"><span>停用</span></a></li>
				<li class="line">line</li>
				<li><a class="icon" href="#"
					onclick="javaScript:processSelectedRecords('enableCustomerInfo','确认启用吗?');"><span>启用</span></a></li>
			 --></ul>
		</div>
		<table id="customerInfolist"></table>
		<div id="customerInfopager"></div>
	</div>
	<!-- 	<div class="panelBar"></div> -->
</body>
</html>